/**
*
* @ author:cmd
* @ wechat:codercmd@qq.com
* @ data: 2020-03-04 13:57
*/
export default class win_hall extends Laya.Script {
    /** @prop {name:button_begin, tips:"开始按钮", type:Node, default:null}*/
    public button_begin:Laya.Node = null;

    constructor() {super();}

    onAwake() {
        orc.log('进入游戏大厅');
        this.button_begin.on(Laya.Event.CLICK,this,this.btn_begin.bind(this));
    }

    //开始游戏按钮
    btn_begin(){        
        this.owner.destroy();
        if(orc.event_manager._dir[orc.event_id.orc_begin_event])
        {
            orc.event_manager.dispatch_event(orc.event_id.orc_begin_event);
        }
        else
        {
            orc.log('游戏开始事件未注册，请orc.event_manager.add_listener(orc.event_id.orc_begin_event,handler:any);')
        }
        
    }
}